package com.ittest.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import lombok.experimental.Accessors;

@Data // lombok提供getter\setter等
@Accessors(chain = true) // lombok提供链式操作
@ContentRowHeight(25) // 行高
public class FillDataHour {

    @HeadStyle(fillBackgroundColor = 4) // 表头样式设置，背景颜色填充，颜色类型4
    @HeadFontStyle(fontName = "宋体", fontHeightInPoints = 25, color = 3) // 表头字体设置，宋体，颜色3
    @ExcelProperty(value = "省级") // 列名
    @ColumnWidth(20) // 列宽
    @ContentFontStyle(fontName = "宋体", color = 4, bold = BooleanEnum.TRUE) // 数据部分单元格字体样式
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    // 数据部分单元格样式
    private String province; // 字段

    @HeadStyle(fillBackgroundColor = 4) // 表头样式设置，背景颜色填充，颜色类型4
    @HeadFontStyle(fontName = "宋体", fontHeightInPoints = 25, color = 3) // 表头字体设置，宋体，颜色3
    @ExcelProperty(value = "市级") // 列名
    @ColumnWidth(20) // 列宽
    @ContentFontStyle(fontName = "宋体", color = 4, bold = BooleanEnum.TRUE) // 数据部分单元格字体样式
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    // 数据部分单元格样式
    private String city; // 字段

    @HeadStyle(fillBackgroundColor = 4) // 表头样式设置，背景颜色填充，颜色类型4
    @HeadFontStyle(fontName = "宋体", fontHeightInPoints = 25, color = 3) // 表头字体设置，宋体，颜色3
    @ExcelProperty(value = "县/区级") // 列名
    @ColumnWidth(20) // 列宽
    @ContentFontStyle(fontName = "宋体", color = 4, bold = BooleanEnum.TRUE) // 数据部分单元格字体样式
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    // 数据部分单元格样式
    private String region; // 字段

    @HeadStyle(fillBackgroundColor = 4)
    @HeadFontStyle(fontName = "楷体", fontHeightInPoints = 25, color = 3)
    @ExcelProperty(value = "1小时降雨量总数")
    @ColumnWidth(20)
    @ContentFontStyle(fontName = "楷体")
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    private String rainSum;

//    @HeadStyle(fillBackgroundColor = 4)
//    @HeadFontStyle(fontName = "微软雅黑", fontHeightInPoints = 25, color = 3)
//    @ExcelProperty(value = "时间")
//    @ColumnWidth(50)
//    @ContentFontStyle(fontName = "微软雅黑")
//    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
//    @DateTimeFormat(value = "yyyy-MM-dd") // 时间格式化
//    private Date date;
    @HeadStyle(fillBackgroundColor = 4) // 表头样式设置，背景颜色填充，颜色类型4
    @HeadFontStyle(fontName = "宋体", fontHeightInPoints = 25, color = 3) // 表头字体设置，宋体，颜色3
    @ExcelProperty(value = "统计降雨量时间范围") // 列名
    @ColumnWidth(40) // 列宽
    @ContentFontStyle(fontName = "宋体", color = 4, bold = BooleanEnum.TRUE) // 数据部分单元格字体样式
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    private String date;

    @HeadStyle(fillBackgroundColor = 4) // 表头样式设置，背景颜色填充，颜色类型4
    @HeadFontStyle(fontName = "宋体", fontHeightInPoints = 25, color = 3) // 表头字体设置，宋体，颜色3
    @ExcelProperty(value = "备注") // 列名
    @ColumnWidth(40) // 列宽
    @ContentFontStyle(fontName = "宋体", color = 4, bold = BooleanEnum.TRUE) // 数据部分单元格字体样式
    @ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
    private String remark;

}
